home *** CD-ROM | disk | FTP | other *** search
MacBinary | 2000-03-26 | 2.1 KB | [ TEXT/MPad]
open in: MacOS 8.1
extracted
|
Win98
extracted
|
DOS
extracted
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary ).
Confidence Program Detection Match Type Support
10%
dexvert
MacBinary (archive/macBinary)
fallback
Supported
1%
dexvert
Text File (text/txt)
fallback
Supported
100%
file
MacBinary II, Sun Mar 26 18:21:45 2000, modified Sun Mar 26 18:21:45 2000, creator 'MPad', type ASCII, 1457 bytes "Chebyshev" , at 0x631 398 bytes resource
default (weak)
99%
file
data
default
74%
TrID
Macintosh plain text (MacBinary)
default
25%
TrID
MacBinary 2
default (weak)
100%
siegfried
fmt/1762 MacBinary (II)
default
100%
lsar
MacBinary
default
id metadata key value macFileType [ TEXT] macFileCreator [ MPad]
hex view +--------+-------------------------+-------------------------+--------+--------+ |00000000| 00 09 43 68 65 62 79 73 | 68 65 76 00 00 00 00 00 |..Chebys|hev.....| |00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000040| 00 54 45 58 54 4d 50 61 | 64 00 00 00 00 00 00 00 |.TEXTMPa|d.......| |00000050| 00 00 00 00 00 05 b1 00 | 00 01 8e b5 04 4c 09 b5 |........|.....L..| |00000060| 04 4c 09 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.L......|........| |00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 11 42 00 00 |........|.....B..| |00000080| 2d 2d 20 41 6e 20 61 72 | 62 69 74 72 61 72 79 20 |-- An ar|bitrary | |00000090| 66 75 6e 63 74 69 6f 6e | 20 63 61 6e 20 62 65 20 |function| can be | |000000a0| 61 70 70 72 6f 78 69 6d | 61 74 65 64 20 62 79 20 |approxim|ated by | |000000b0| 61 20 77 65 69 67 68 74 | 65 64 20 73 75 6d 20 6f |a weight|ed sum o| |000000c0| 66 20 43 68 65 62 79 73 | 68 65 76 20 70 6f 6c 79 |f Chebys|hev poly| |000000d0| 6e 6f 6d 69 61 6c 73 2e | 0d 2d 2d 20 41 20 43 68 |nomials.|.-- A Ch| |000000e0| 65 62 79 73 68 65 76 20 | 70 6f 6c 79 6e 6f 6d 69 |ebyshev |polynomi| |000000f0| 61 6c 20 6f 66 20 64 65 | 67 72 65 65 20 6e 20 69 |al of de|gree n i| |00000100| 73 20 64 65 66 69 6e 65 | 64 20 61 73 3a 0d 2d 2d |s define|d as:.--| |00000110| 20 54 28 78 29 5b 6e 5d | 20 3d 20 31 20 77 68 65 | T(x)[n]| = 1 whe| |00000120| 6e 20 6e 3d 30 2c 0d 2d | 2d 20 20 20 20 20 20 20 |n n=0,.-|- | |00000130| 20 20 20 20 78 20 77 68 | 65 6e 20 6e 3d 31 2c 0d | x wh|en n=1,.| |00000140| 2d 2d 20 20 20 20 20 20 | 20 20 20 20 20 32 2a 78 |-- | 2*x| |00000150| 2a 54 28 78 29 5b 6e 2d | 31 5d 20 2d 20 54 28 78 |*T(x)[n-|1] - T(x| |00000160| 29 5b 6e 2d 32 5d 0d 2d | 2d 20 6f 72 20 74 68 65 |)[n-2].-|- or the| |00000170| 20 65 78 70 6c 69 63 69 | 74 20 66 6f 72 6d 75 6c | explici|t formul| |00000180| 61 3a 0d 0d 54 28 78 29 | 5b 6e 5d 20 3d 20 63 6f |a:..T(x)|[n] = co| |00000190| 73 28 6e 2a 61 63 6f 73 | 28 78 29 29 0d 0d 58 6d |s(n*acos|(x))..Xm| |000001a0| 69 6e 3d 2d 31 3b 20 58 | 6d 61 78 3d 31 3b 20 54 |in=-1; X|max=1; T| |000001b0| 69 74 6c 65 3d 22 43 68 | 65 62 79 73 68 65 76 20 |itle="Ch|ebyshev | |000001c0| 70 6f 6c 79 6e 6f 6d 69 | 61 6c 73 22 0d 70 6c 6f |polynomi|als".plo| |000001d0| 74 20 54 28 58 29 5b 30 | 3a 36 5d 20 20 2d 2d 20 |t T(X)[0|:6] -- | |000001e0| 73 68 6f 77 20 74 68 65 | 20 66 69 72 73 74 20 66 |show the| first f| |000001f0| 65 77 20 70 6f 6c 79 6e | 6f 6d 69 61 6c 73 0d 0d |ew polyn|omials..| |00000200| 2d 2d 20 54 68 65 20 77 | 65 69 67 68 74 69 6e 67 |-- The w|eighting| |00000210| 20 63 6f 65 66 66 69 63 | 69 65 6e 74 73 20 63 61 | coeffic|ients ca| |00000220| 6e 20 62 65 20 63 61 6c | 63 75 6c 61 74 65 64 20 |n be cal|culated | |00000230| 75 73 69 6e 67 20 74 68 | 65 20 76 61 6c 75 65 73 |using th|e values| |00000240| 20 6f 66 20 74 68 65 20 | 61 72 62 69 74 72 61 72 | of the |arbitrar| |00000250| 79 20 66 75 6e 63 74 69 | 6f 6e 20 61 74 20 74 68 |y functi|on at th| |00000260| 65 20 7a 65 72 6f 73 20 | 6f 66 20 54 28 78 29 2e |e zeros |of T(x).| |00000270| 20 54 28 78 29 5b 6e 5d | 20 68 61 73 20 6e 20 7a | T(x)[n]| has n z| |00000280| 65 72 6f 73 20 62 65 74 | 77 65 65 6e 20 2d 31 20 |eros bet|ween -1 | |00000290| 61 6e 64 20 2b 31 20 6c | 6f 63 61 74 65 64 20 61 |and +1 l|ocated a| |000002a0| 74 3a 0d 0d 78 7a 5b 6b | 5d 20 3d 20 63 6f 73 28 |t:..xz[k|] = cos(| |000002b0| 70 69 2a 52 61 64 69 61 | 6e 73 2a 28 6b 2d 2e 35 |pi*Radia|ns*(k-.5| |000002c0| 29 2f 6e 29 20 64 69 6d | 5b 6e 5d 0d 0d 2d 2d 20 |)/n) dim|[n]..-- | |000002d0| 74 68 65 20 4e 20 63 6f | 65 66 66 69 63 69 65 6e |the N co|efficien| |000002e0| 74 73 3a 0d 63 5b 6a 5d | 20 3d 20 28 32 2f 6e 29 |ts:.c[j]| = (2/n)| |000002f0| 2a 73 75 6d 28 66 28 78 | 7a 5b 6b 5d 29 2a 54 28 |*sum(f(x|z[k])*T(| |00000300| 78 7a 5b 6b 5d 29 5b 6a | 2d 31 5d 2c 6b 2c 31 2c |xz[k])[j|-1],k,1,| |00000310| 6e 29 20 64 69 6d 5b 6e | 5d 0d 63 63 3a 3d 63 3a |n) dim[n|].cc:=c:| |00000320| 3b 20 20 2d 2d 20 73 61 | 76 65 20 74 68 65 20 63 |; -- sa|ve the c| |00000330| 6f 65 66 66 69 63 69 65 | 6e 74 73 0d 0d 2d 2d 20 |oefficie|nts..-- | |00000340| 74 68 65 20 61 70 70 72 | 6f 78 69 6d 61 74 69 6f |the appr|oximatio| |00000350| 6e 20 66 6f 72 6d 75 6c | 61 3a 0d 61 70 70 72 6f |n formul|a:.appro| |00000360| 78 28 63 63 2c 78 29 20 | 3d 20 73 75 6d 28 63 63 |x(cc,x) |= sum(cc| |00000370| 5b 6b 5d 2a 54 28 78 29 | 5b 6b 2d 31 5d 2c 6b 2c |[k]*T(x)|[k-1],k,| |00000380| 31 2c 63 6f 75 6e 74 28 | 63 63 29 29 20 2d 20 63 |1,count(|cc)) - c| |00000390| 63 5b 31 5d 2f 32 0d 0d | 2d 2d 20 54 72 79 20 61 |c[1]/2..|-- Try a| |000003a0| 6e 20 65 78 61 6d 70 6c | 65 20 66 75 6e 63 74 69 |n exampl|e functi| |000003b0| 6f 6e 2e 20 53 6d 6f 6f | 74 68 20 66 75 6e 63 74 |on. Smoo|th funct| |000003c0| 69 6f 6e 73 20 61 72 65 | 20 65 61 73 79 2e 20 54 |ions are| easy. T| |000003d0| 72 79 20 73 6f 6d 65 74 | 68 69 6e 67 20 61 20 62 |ry somet|hing a b| |000003e0| 69 74 20 74 6f 75 67 68 | 65 72 2e 0d 0d 66 28 78 |it tough|er...f(x| |000003f0| 29 20 3d 20 78 20 77 68 | 65 6e 20 78 3c 2d 2e 35 |) = x wh|en x<-.5| |00000400| 2c 20 2d 2e 35 20 77 68 | 65 6e 20 78 3c 2e 35 2c |, -.5 wh|en x<.5,| |00000410| 20 2d 78 0d 0d 6e 3d 31 | 35 3b 20 20 2d 2d 20 6e | -x..n=1|5; -- n| |00000420| 75 6d 62 65 72 20 6f 66 | 20 63 6f 65 66 66 69 63 |umber of| coeffic| |00000430| 69 65 6e 74 73 20 74 6f | 20 75 73 65 0d 0d 6e 65 |ients to| use..ne| |00000440| 77 61 78 69 73 0d 70 6c | 6f 74 20 66 28 58 29 0d |waxis.pl|ot f(X).| |00000450| 70 6c 6f 74 20 7b 78 7a | 2c 66 28 78 7a 29 7d 0d |plot {xz|,f(xz)}.| |00000460| 70 6c 6f 74 20 61 70 70 | 72 6f 78 28 63 63 2c 58 |plot app|rox(cc,X| |00000470| 29 0d 0d 2d 2d 20 4f 6e | 63 65 20 74 68 65 20 63 |)..-- On|ce the c| |00000480| 6f 65 66 66 69 63 69 65 | 6e 74 73 20 61 72 65 20 |oefficie|nts are | |00000490| 6b 6e 6f 77 6e 20 74 68 | 65 79 20 63 61 6e 20 62 |known th|ey can b| |000004a0| 65 20 75 73 65 64 20 74 | 6f 20 64 65 72 69 76 65 |e used t|o derive| |000004b0| 20 63 6f 65 66 66 69 63 | 69 65 6e 74 73 20 74 6f | coeffic|ients to| |000004c0| 20 61 70 70 72 6f 78 69 | 6d 61 74 65 20 74 68 65 | approxi|mate the| |000004d0| 20 69 6e 74 65 67 72 61 | 6c 2e 0d 0d 63 69 5b 69 | integra|l...ci[i| |000004e0| 5d 20 3d 20 28 63 63 5b | 69 2d 31 5d 2d 63 63 5b |] = (cc[|i-1]-cc[| |000004f0| 69 2b 31 5d 29 2f 28 32 | 2a 28 69 2d 31 29 29 20 |i+1])/(2|*(i-1)) | |00000500| 77 68 65 6e 20 69 3e 31 | 2c 0d 20 20 20 20 20 20 |when i>1|,. | |00000510| 20 20 20 20 63 69 30 20 | 64 69 6d 5b 6e 2d 31 5d | ci0 |dim[n-1]| |00000520| 0d 63 69 30 20 3d 20 30 | 20 20 20 2d 2d 20 61 72 |.ci0 = 0| -- ar| |00000530| 62 69 74 72 61 72 79 20 | 63 6f 6e 73 74 61 6e 74 |bitrary |constant| |00000540| 20 6f 66 20 69 6e 74 65 | 67 72 61 74 69 6f 6e 0d | of inte|gration.| |00000550| 0d 6e 65 77 61 78 69 73 | 20 0d 70 6c 6f 74 20 61 |.newaxis| .plot a| |00000560| 70 70 72 6f 78 28 63 69 | 2c 58 29 0d 0d 2d 2d 20 |pprox(ci|,X)..-- | |00000570| 54 68 65 79 20 63 61 6e | 20 61 6c 73 6f 20 62 65 |They can| also be| |00000580| 20 75 73 65 64 20 74 6f | 20 66 69 6e 64 20 63 6f | used to| find co| |00000590| 65 66 66 69 63 69 65 6e | 74 73 20 74 6f 20 61 70 |efficien|ts to ap| |000005a0| 70 72 6f 78 69 6d 61 74 | 65 20 74 68 65 20 74 68 |proximat|e the th| |000005b0| 65 20 64 65 72 69 76 61 | 74 69 76 65 2e 0d 0d 63 |e deriva|tive...c| |000005c0| 64 3a 3d 30 5b 31 3a 6e | 5d 3a 0d 63 64 5b 6e 2d |d:=0[1:n|]:.cd[n-| |000005d0| 31 5d 3a 3d 32 2a 28 6e | 2d 31 29 2a 63 63 5b 6e |1]:=2*(n|-1)*cc[n| |000005e0| 5d 3a 0d 6a 3a 3d 6e 2d | 32 3a 0d 28 63 64 5b 6a |]:.j:=n-|2:.(cd[j| |000005f0| 5d 3a 3d 63 64 5b 6a 2b | 32 5d 20 2b 20 32 2a 6a |]:=cd[j+|2] + 2*j| |00000600| 2a 63 63 5b 6a 2b 31 5d | 2c 20 6a 3a 3d 6a 2d 31 |*cc[j+1]|, j:=j-1| |00000610| 29 20 77 68 69 6c 65 20 | 6a 3e 30 3a 0d 0d 70 6c |) while |j>0:..pl| |00000620| 6f 74 20 61 70 70 72 6f | 78 28 63 64 2c 58 29 0d |ot appro|x(cd,X).| |00000630| 0d 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000680| 00 00 01 00 00 00 01 3c | 00 00 00 3c 00 00 00 52 |.......<|...<...R| |00000690| 63 6f 73 28 78 29 29 0d | 58 6d 69 6e 3d 2d 31 3b |cos(x)).|Xmin=-1;| |000006a0| 20 58 6d 61 78 3d 31 0d | 0d 0d 54 54 28 6e 2c 78 | Xmax=1.|..TT(n,x| |000006b0| 09 43 68 65 62 79 73 68 | 65 76 02 00 00 00 54 45 |.Chebysh|ev....TE| |000006c0| 58 54 4d 50 61 64 01 00 | 00 34 00 40 00 00 00 00 |XTMPad..|.4.@....| |000006d0| 00 00 54 45 58 54 4d 50 | 61 64 01 00 00 34 00 40 |..TEXTMP|ad...4.@| |000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |000006f0| 00 00 ad 78 e3 4f 00 00 | 05 b0 00 00 01 8e 70 69 |...x.O..|......pi| |00000700| 2a 28 6b 2d 2e 35 29 2f | 4e 29 20 64 69 6d 5b 4e |*(k-.5)/|N) dim[N| |00000710| 5d 0d 66 28 78 29 20 3d | 20 78 5e 33 0d 63 5b 6a |].f(x) =| x^3.c[j| |00000720| 5d 20 3d 20 28 32 2f 4e | 29 2a 73 75 6d 28 66 28 |] = (2/N|)*sum(f(| |00000730| 78 73 5b 6b 5d 29 2a 54 | 28 6a 2d 31 2c 78 73 5b |xs[k])*T|(j-1,xs[| |00000740| 6b 5d 29 2c 6b 2c 31 2c | 4e 29 20 64 69 6d 5b 4e |k]),k,1,|N) dim[N| |00000750| 5d 0d 4e 3d 31 30 0d 63 | 63 3a 3d 63 3a 3b 20 63 |].N=10.c|c:=c:; c| |00000760| 63 3a 7b 30 2e 30 30 30 | 2c 30 2e 37 35 30 2c 30 |c:{0.000|,0.750,0| |00000770| 2e 30 30 30 2c 30 2e 32 | 35 30 2c 2d 30 2e 30 30 |.000,0.2|50,-0.00| |00000780| 00 00 00 20 01 02 03 03 | 00 02 3f ff 80 00 00 00 |... ....|..?.....| |00000790| 00 00 00 00 01 54 01 39 | 00 05 00 28 00 ea 01 37 |.....T.9|...(...7| |000007a0| 01 59 00 29 00 00 00 14 | 00 04 06 4d 6f 6e 61 63 |.Y.)....|...Monac| |000007b0| 6f 01 39 06 4d 6f 6e 61 | 63 6f 01 39 00 00 01 00 |o.9.Mona|co.9....| |000007c0| 00 00 01 3c 00 00 00 3c | 00 00 00 52 02 fe a1 74 |...<...<|...R...t| |000007d0| 03 d2 00 00 00 1c 00 46 | 00 01 50 52 65 66 00 00 |.......F|..PRef..| |000007e0| 00 12 53 54 52 23 00 00 | 00 1e 00 80 ff ff 00 00 |..STR#..|........| |000007f0| 00 00 00 00 00 00 00 81 | 00 00 00 00 00 24 00 00 |........|.....$..| |00000800| 00 00 0b 66 6f 6e 74 20 | 26 20 73 69 7a 65 00 00 |...font |& size..| |00000810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| +--------+-------------------------+-------------------------+--------+--------+